package com.hl.toolkit.server.tycoin.system.slaverepository;

import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.system.slaveentity.DicItem;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DicItemRepository extends AbstractRepository<DicItem, Long> {

    @Query("SELECT v FROM Dic as d left join d.dicItemList as v where d.id = :dicId and v.value = :val")
    List<DicItem> findByDicItem(@Param(value = "dicId") Long dicId, @Param(value = "val") String val);

}
